<html><head><title>Folders</title><style type="text/css" media="all">
body,html{color:#000000;background-color:#ffffff;font-family:tahoma,sans-serif;}
a{color:#336699;}
a:hover{color:#ff6600;}
li{color:#336699;}
p{margin:10px;}</style></head><body><?php

	$path = str_replace('\\', '/', dirname(__FILE__));
	$dirs = $names = array();
	if (false != ($dir = @dir($path)))
	{
		while (false !== ($entry = $dir->read()))
		{
			if($entry != '.' && $entry != '..')
			{
				if (is_dir($entry))
				{
					$dirs[] = $entry;
				}
				else
				{
					$names[] = $entry;
				}
			}
		}
	}

	natcasesort($dirs);
	natcasesort($names);

	echo '<b>'.$path .'</b><ul><p>';
	foreach ($dirs as $dir)
	{
		echo '<li><a href="'.$dir.'/" title="'.str_replace('\\', '/', $path.'/'.$dir).'/"><b>'.$dir.'</b></a></li>';
	}

	echo '</p><p>';
	foreach ($names as $name)
	{
		echo '<li type="circle"><a href="'.$name.'" title="'.str_replace('\\', '/', $path.'/'.$dir).'">'.$name.'</a></li>';
	}
	echo '</p></ul>';

?></body></html>